MS C/C++: The link Command
1 Syntax
The link command has the following syntax:
2 Options
The list of valid options/switches for the link command includes
the following:
| DEBUG |
Creates debugging information. |
| DEFAULTLIB:libname
|
Searches the specified library |
| HEAP:reserve[,
commit] |
Sets the size of the heap. |
| LIBPATH:path
|
Allows the user to override the library path (in the environment). |
| OUT:filename
|
Specifies the output file name. |
| PROFILE |
Enables profiling. |
| STACK:reserve[,
commit] |
Sets the size of the stack. |
| VERSION:major[,
minor] |
Specifies a version number. |
3 Examples
The following command links
test.obj and
sub.obj
and creates the executable
test.exe:
link test.obj sub.obj -OUT:test.exe
4 Error and Warning Messages
To get a description of an error or warning message, enter the
error code below and click on the
Find button.